/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

export const baseRouter = {
  path: '/base',
  component: Layout,
  redirect: '/base/index',
  name: 'baseRouter',
  meta: {
    title: '基础数据',
    icon: 'el-icon-s-home'
  },
  children: [
    {
      path: 'index',
      component: () => import('@/views/base/index'),
      name: '项目数据',
      meta: { title: '项目数据', roles: ['80001'] }
    },
    {
      path: 'department',
      component: () => import('@/views/base/department'),
      name: '部门管理',
      meta: { title: '部门管理', roles: ['81001'] }
    },
    {
      path: 'level',
      component: () => import('@/views/base/level'),
      name: '员工级别',
      meta: { title: '员工级别', roles: ['82001'] }
    },
    {
      path: 'holidays',
      component: () => import('@/views/base/holidays'),
      name: '节假日',
      meta: { title: '节假日', roles: ['83001'] }
    },
    {
      path: 'service-offer',
      component: () => import('@/views/base/service-offer'),
      name: '服务报价',
      meta: { title: '服务报价', roles: ['84001'] }
    }
  ]
}

export const roleRouter = {
  path: '/role',
  component: Layout,
  redirect: '/role/index',
  name: 'roleRouter',
  meta: {
    title: '角色权限',
    icon: 'el-icon-s-cooperation'
  },
  children: [
    {
      path: 'index',
      component: () => import('@/views/role/index'),
      name: '角色管理',
      meta: { title: '角色管理', roles: ['90001'] }
    }
  ]
}

export const dataRouter = {
  path: '/data',
  component: Layout,
  redirect: '/data/index',
  name: 'dataRouter',
  meta: {
    title: '数据权限',
    icon: 'el-icon-s-finance'
  },
  children: [
    {
      path: 'index',
      component: () => import('@/views/role/data'),
      name: '数据权限',
      meta: { title: '数据权限' }
    }
  ]
}

// export default baseRouter
